import request from '@/utils/request'

export default {
  // 列表
  query(data) {
    return request({
      url: `/v1/product/product/list`,
      method: 'post',
      data
    })
  },
  // 编辑
  edit(data) {
    return request({
      url: `/v1/product/product/edit`,
      method: 'post',
      data
    })
  },
  // 详情
  detail(params) {
    return request({
      url: `/v1/product/product/detail`,
      method: 'get',
      params
    })
  },
  // 匹配1688sku
  match(params) {
    return request({
      url: `/v1/product/product/match`,
      method: 'get',
      params
    })
  },
  // 批量匹配1688sku
  batchMatch(params) {
    return request({
      url: `/v1/product/product/batch-match`,
      method: 'get',
      params
    })
  },
  // 关联1688
  assoc(data) {
    return request({
      url: `/v1/product/product/assoc`,
      method: 'post',
      data
    })
  },
  // 批量关联1688
  batchAssoc(data) {
    return request({
      url: `/v1/product/product/batch-assoc`,
      method: 'post',
      data
    })
  },
  // 批量修改供应商
  batchEditSupplier(data) {
    return request({
      url: `/v1/product/product/batch-edit-supplier`,
      method: 'post',
      data
    })
  },
  // 历史移动加权平均价
  historyPrice(data) {
    return request({
      url: `/v1/product/product/get-move-price-log`,
      method: 'post',
      data
    })
  },
}
